package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckGroup;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckGroupMapper {

    void add(CheckGroup checkGroup);

    void edit(CheckGroup checkGroup);

    @Select("select * from t_checkgroup where id = #{id}")
    CheckGroup findById(Integer id);

    @Delete("delete from t_checkgroup where id = #{id}")
    void deleteById(Integer id);

    Page<CheckGroup> selectByCondition(String queryString);

    @Select("select * from t_checkgroup")
    List<CheckGroup> findAll();
}
